﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Push
{
	public partial class ThreeDigit : UserControl
	{
        public int Number
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                string number = value.ToString();

                int len = number.Length;

                Digit1.Visibility = System.Windows.Visibility.Collapsed;
                Digit2.Visibility = System.Windows.Visibility.Collapsed;
                Digit1.Text = "";
                Digit2.Text = "";

                Digit3.Text = number[len - 1].ToString();
                if (len > 1) { Digit2.Text = number[len - 2].ToString(); Digit2.Visibility = System.Windows.Visibility.Visible; }
                if (len > 2) { Digit1.Text = number[len - 3].ToString(); Digit1.Visibility = System.Windows.Visibility.Visible; }
            }
        }

        public Brush Color
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                Digit1.Color = value;
                Digit2.Color = value;
                Digit3.Color = value;
            }
        }

        public HorizontalAlignment Aligment
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                Stack.HorizontalAlignment = value;
            }
        }

		public ThreeDigit()
		{
			// Required to initialize variables
			InitializeComponent();
		}
	}
}